Why don't you just read the (pseudo) file? No need to open new processes. Using w = int(open('/sys/class/leds/omega2lte:blue:wifi/brightness').read()) Will give you what you need from python in a pythonic way.